From 204732dd72585da399c4ed7c4a452e3ac735bb40 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Thu, 19 Oct 2006 14:38:34 +0100 Subject: [PATCH] [XEN] Forcibly undefine swap{16,32,64} in mkelf32 program. Signed-off-by: Keir Fraser --- xen/arch/x86/boot/mkelf32.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/arch/x86/boot/mkelf32.c b/xen/arch/x86/boot/mkelf32.c index 53cc514295..18e52b5836 100644 --- a/xen/arch/x86/boot/mkelf32.c +++ b/xen/arch/x86/boot/mkelf32.c @@ -90,6 +90,11 @@ static Elf32_Shdr out_shdr[] = { } }; +/* Some system header files define these macros and pollute our namespace. */ +#undef swap16 +#undef swap32 +#undef swap64 + #define swap16(_v) ((((u16)(_v)>>8)&0xff)|(((u16)(_v)&0xff)<<8)) #define swap32(_v) (((u32)swap16((u16)(_v))<<16)|(u32)swap16((u32)((_v)>>16))) #define swap64(_v) (((u64)swap32((u32)(_v))<<32)|(u64)swap32((u32)((_v)>>32))) -- 2.30.2